<script setup>
	import {
		onLaunch,
		onShow,
		onHide,
		onLoad
	} from '@dcloudio/uni-app';
	import {
		getToken,
		setToken,
		removeToken,
		getUser,
		setUser,
		removeUser
	} from '@/utils/auth';
	const kfa = () => {
		uni.showToast({
			title: '功能开发中',
			icon: 'none',
			duration: 2000
		})
	}

	onLaunch(async () => {
		console.log('App Launch');

	});
	onHide(() => {
		console.log('App Hide');
	});
	onShow(() => {
		console.log('App Show');
	});
	onLoad(() => {
		console.log('开始加载字体...')
		
		// 条件编译，只在微信小程序中加载
		// #ifdef MP-WEIXIN
		wx.loadFontFace({
			global: true,
			family: 'PingFangSC',
			source: `url("https://cy.sry6.com/pingf.otf")`,
			success: (e) => {
				console.log('PingFangSC字体加载成功!', e);
				// 设置全局标记
				getApp().globalData.fontLoaded = true
			},
			fail: function(e) {
				console.error('PingFangSC字体加载失败！', e);
				console.log('将使用系统默认字体');
				// 即使失败也设置标记，避免阻塞
				getApp().globalData.fontLoaded = true
			}
		});
		// #endif
		
		// #ifndef MP-WEIXIN
		console.log('非微信小程序环境，使用系统字体');
		getApp().globalData.fontLoaded = true
		// #endif
	})
</script>

<style lang="scss">
	@import 'uview-plus/index.scss';
	@import '@/static/scss/index.scss';

	.u-tabbar,
	.u-tabbar__content {
		z-index: 9999;
		height: 170rpx !important;
		border-radius: 30rpx 30rpx 0rpx 0rpx !important;
	}

	.u-tabbar--fixed {
		z-index: 9999;
		height: 170rpx !important;
		border-radius: 30rpx 30rpx 0rpx 0rpx !important;
	}

	Page,
	body {
		background-color: rgb(244, 244, 244) !important;
	}

	.svg-color {
		-webkit-mask-repeat: no-repeat !important;
		mask-repeat: no-repeat !important;
		-webkit-mask-size: contain !important;
		mask-size: contain !important;
	}
	@font-face {
        font-family: 'PingFangSC';
        src: url("https://cy.sry6.com/pingf.otf");
    }
    @font-face {
        font-family: 'PingFangSC';
        src: url("https://cy.sry6.com/pingf.otf");
    }
	@font-face {
        font-family: 'D-DIN-PRO';
        src: url("https://cy.sry6.com/dif.ttf");
    }
    @font-face {
        font-family: 'D-DIN-PRO';
        src: url("https://cy.sry6.com/dif.ttf");
    }
	// #ifdef H5
	body {
		background-color: #f7f7f7;
	}

	// #endif
</style>
<style>
	/* @tailwind base; */
	/* @tailwind utilities; */
</style>